package java_thinking.unit_14._14_3;

import java.util.HashMap;

/**
 * @Description :
 * @author: cww
 * @DateTime: 2019-03-28 22:59
 */

public class Excercice {
    public class Count extends HashMap<String,Integer>{
        public void count(String type){
            Integer quantity = get(type);
            if (quantity == null){
                this.put(type,1);
            } else {
                put(type,quantity+1);
            }
        }
    }
}
